#include "AttrDelegate.h"

AttrDelegate::AttrDelegate(QObject *parent)
				: QItemDelegate(parent)
{
	
}

AttrDelegate::~AttrDelegate()
{

}

QWidget *AttrDelegate::createEditor(QWidget *parent,
									const QStyleOptionViewItem &option ,
									const QModelIndex &index) const
{
	
	QLineEdit *editor = new QLineEdit(parent);
	return editor;
}

void AttrDelegate::setEditorData(QWidget *_editor,
								 const QModelIndex &index) const
{
}

void AttrDelegate::setModelData(QWidget *_editor, 
								QAbstractItemModel *model,
								const QModelIndex &index) const
{
}

void AttrDelegate::updateEditorGeometry(QWidget *editor,
										const QStyleOptionViewItem &option, 
										const QModelIndex & index ) const
{
	editor->setGeometry(option.rect);
}
